package com.tjetc.reflect;

import java.io.Serializable;

@SuppressWarnings("all")
public class _1Cat implements Serializable {
    public static String name = "zhangsan";
    private Integer age;

    public _1Cat() {
    }

    public _1Cat(String name, Integer age) {
        this.name = name;
        this.age = age;
    }

    private _1Cat(String name) {
        // 本身该方法不能被调用 但是通过反射可以暴力破解来调用
//        throw new RuntimeException();
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    @Override
    public String toString() {
        return "_1Cat{" +
                "name='" + name + '\'' +
                ", age=" + age +
                '}';
    }

    public void hi(){
//        System.out.println("hi");
    }

    public void hello(){
        System.out.println("hello");
    }

    public void f(String s){

    }

    public void f1(int i){}

    public static void f2(){}

    private void f3(){}
}
